import './assets/main.css';

import { createApp } from 'vue';
import { init18n } from '@/lang';
import App from './App.vue';
import router from './router';
import '@/utils/jsBridge';
import '@wangeditor/editor/dist/css/style.css';
import VConsole from 'vconsole';
import { getAppConfig } from './utils/getAppConfig';
import { getStore } from './utils/utils';

if (import.meta.env.MODE != 'prod') {
    new VConsole();
}

async function init() {
    await getAppConfig();

    const app = createApp(App);
    init18n(app, getStore('mamak-lang'));
    app.use(router);
    app.mount('#app');
}

init();
